package org.spiderflow.common.model;

import org.spiderflow.common.executor.ShapeExecutor;

import java.util.Map;

/**
 * @author zhaoshihao
 * @version 2021/10/28 15:36
 */
public class SpiderTask {

    public final Runnable runnable;

    public final SpiderNode node;

    public final Map<String, Object> variables;

    public final ShapeExecutor executor;

    public SpiderTask(Runnable runnable, SpiderNode node, Map<String, Object> variables, ShapeExecutor executor) {
        this.runnable = runnable;
        this.node = node;
        this.variables = variables;
        this.executor = executor;
    }

    public Runnable getRunnable() {
        return runnable;
    }

    public SpiderNode getNode() {
        return node;
    }

    public Map<String, Object> getVariables() {
        return variables;
    }

    public ShapeExecutor getExecutor() {
        return executor;
    }
}
